﻿using System;
using System.Text;

namespace CardPlay.Model.Primitives
{
    public static class ExtensionsToString
    {
        public static string SplitIntoWords(this string s)
        {
            var result = new StringBuilder();

            foreach (var ch in s)
            {
                if (result.Length > 0 && Char.IsUpper(ch))
                    result.Append(' ');

                result.Append(ch);
            }

            return result.ToString();
        }
    }
}